package pta.newch04.ex19;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int radius = scanner.nextInt();
        int height = scanner.nextInt();
        Cylinder cylinder1 = new Cylinder(radius,height);
        System.out.println(cylinder1.getVolumn());
        Cylinder cylinder2 = new Cylinder();
        System.out.println(cylinder2.getVolumn());
        scanner.close();
    }
}

class Cylinder{
    public int getRadius() {
        return radius;
    }

    public void setRadius(int radius) {
        this.radius = radius;
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    public Cylinder(int radius, int height) {
        System.out.println("Constructor with para");
        this.radius = radius;
        this.height = height;
    }
    public Cylinder(){
        this (2,1);
        System.out.println("Constructor no para");
    }

    private int radius;
    private int height;

    public int getVolumn() {
        return (int) (Math.PI * radius * radius * height) ;
    }
}